import request from "@/utils/requestFastGPT"

// 获取知识库列表
export function getFastGPTDatasetListAPI(data = {}) {
  return request({
    url: "/core/dataset/list?parentId=",
    method: "post",
    data,
  })
}

// 获取集合列表
export function getFastGPTCollectionListAPI(data = {}) {
  return request({
    url: "/core/dataset/collection/list",
    method: "post",
    data,
  })
}

// 获取对话记录列表
export function getPaginationRecordsAPI(data = {}) {
  return request({
    url: "/core/chat/getPaginationRecords",
    method: "post",
    data,
  })
}

// 删除一条集合
export function deleteAPI(data = {}) {
  return request({
    url: "/core/dataset/collection/delete?id=" + data.id,
    method: "get",
    data,
  })
}
// 获取集合详情
export function getCollectionDetailAPI(data = {}) {
  return request({
    url: "/core/dataset/collection/detail?id=" + data.id,
    method: "get",
  })
}

// 获取集合数据列表
export function getCollectionDataListAPI(data = {}) {
  return request({
    url: "/core/dataset/data/v2/list",
    method: "post",
    data,
  })
}

// 获取集合单条数据详情
export function getDatasetDetailAPI(data = {}) {
  return request({
    url: "/core/dataset/data/detail?id=" + data.id,
    method: "get",
  })
}

// 获取工单下的历史对话记录
export function chatlistAPI(data = {}) {
  return request({
    url: "/core/chat/init?appId=" + data.appId + "&chatId=" + data.chatId,
    method: "get",
    data,
  })
}
// 获取工单下的历史对话记录
export function getHistoriesAPI(data = {}) {
  return request({
    url: "/core/chat/getHistories",
    method: "get",
    data,
  })
}
